"""
题目7：将一个列表的数据复制到另一个列表中。
"""

import datetime
import time
from time import sleep
# a = [1, 2, 3, 4, 5]
# b = a[:]
# c = a.copy()
# a[0] = "a"

# print(a)
# print(b)
# print(c)

"""
题目8：输出 9*9 乘法口诀表。
"""
# 自己写的，打印出来是倒着的乘法口诀表
# for i in range(1, 10):
#     for j in range(i, 10):
#         print("{}*{}={}".format(i, j, i*j), end=" ")
#     print("\n")

# # 这打印出来是正的
# for i in range(1, 10):
#     for j in range(1, i+1):
#         print("{}*{}={}".format(i, j, i*j), end=" ")
#     print("\n")

"""
题目9：暂停一秒输出。
"""
# d = [1, 2, 3, 4, 5, 6, 7]


# def wait():
#     for i in d:
#         print(i)
#         sleep(1)


# wait()

"""
题目10：暂停一秒输出，并格式化当前时间。
"""
d = [1, 2, 3]


def wait():
    for i in d:
        print(i)
        time.sleep(1)
        now_time = datetime.datetime.now()
        print(now_time)
        print(now_time.strftime(r'%Y%m%d %H:%M:%S'))


wait()
